package org.objective.dal;

import java.io.Serializable;
import java.util.Map;
import org.common.dynamicbean.DynamicBean;

/**
 *
 * @author gus
 */
class RowValueCollectionImpl implements RowValueCollection, Serializable
{
    private static final long serialVersionUID = 83456823672450012L;
    private final Map<Long, DynamicBean> storage;
   
    public RowValueCollectionImpl( Map<Long, DynamicBean> storage)
    {
        this.storage = storage;

    }

    @Override
    public RowValue getRowValue( long objectID ) throws Exception
    {
        return new RowValue(objectID, storage.get(objectID));
    }
    
    @Override
    public int size()
    {
        return storage.size();
    }

    @Override
    public boolean isEmpty()
    {
        return size() == 0;
    }
    
//    public Interval  getInterval()
//    {
//        
//    }
    
}
